<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>创建person对象</title>
	</head>
	<body>
		<div id="exam"></div>
	</body>
	
	<script type="text/javascript">
		function Person(){
			Person.prototype.name="朗晓明";
			Person.prototype.age="37";
			Person.prototype.job="司机";
			Person.prototype.address="北京东城区";
			Person.prototype.intro=function(){
        	var ss="姓名："+this.name+"<br/>"+"年龄："+this.age+"<br/>"+"职业："+this.job+"<br/>"+"住址："+this.address;
			document.getElementById("exam").innerHTML=ss;
//			alert(this.name);
			}
           
		}
		
		var tom=new Person();
		tom.name="老王";
		tom.intro();
		var nancy=new Person();
		nancy.intro();
		alert(tom.name);
		alert(nancy.name);
		
		
		
	</script>
</html>
